package com.zx.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.controller.client.ConsultationClient;
import com.zx.cloud.domain.Consultation;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

import io.swagger.annotations.ApiOperation;


@RestController
@RequestMapping(value = ApiVersion.API_V1_PREFIX+"/consultation", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class ConsultationController {

	@Autowired
	private ConsultationClient consultationClient;
	
	@ApiOperation(value = "查看公告表内容" , notes = "查看公告表内容")
	@RequestMapping(value = "queryConsultationApi", method = RequestMethod.POST)
	@ResponseBody
	public ObjectDataResponse<Page<Consultation>> queryConsultationApi(@RequestBody Consultation consultation) {
		consultation.setStatus(0);
		return consultationClient.queryConsultationApi(consultation);
	}

}
